{erl_opts, [debug_info, fail_on_warning]}.
{cover_enabled, true}.
{shell, [
  {apps, [robotServer]},
  {config, "config/sys.config"}
]}.
{rebar_packages_cdn, "https://hexpm.upyun.com"}.
{deps, [
  {mysql, ".*", {git, "https://github.com/mysql-otp/mysql-otp", {tag, "1.5.1"}}},
  {gun, ".*", {git, "https://github.com/ninenines/gun", {tag, "2.0.0-pre.2"}}},
  {jsx, {git, "https://github.com/talentdeficit/jsx.git", {branch, "v2.8.0"}}},
  {lager, {git, "https://github.com/erlang-lager/lager", {branch, "master"}}},
  {observer_cli,{git,"https://github.com/zhongwencool/observer_cli",{branch,"master"}}}
]}.
{plugins, [rebar3_appup_plugin]}.
{provider_hooks, [
  {pre, [{tar, {appup, tar}}]},
  {post, [{compile, {appup, compile}},
    {clean, {appup, clean}}]}
]}.
{erl_opts, [
  encrypt_debug_info,
  {parse_transform, lager_transform}
]}.

%% 定义默认发布环境(default环境)
{relx, [
  {release,
    {robotServer, "1.3.1"},
    [robotServer, sasl]
  },
  {sys_config, "./config/sys.config"},
  {vm_args, "./config/vm.args"},
  {dev_mode, false},%% 当dev_mode==true时 _build/default/rel/myapp/lib/目录下的库其实是_build/default/lib目录下对应lib的软链接，这样重新编译后，无需重新发布，重启或热加载代码即可
  {include_erts, false}, %% 是否在发布目录中包含虚拟机 即为一个独立的运行环境
  {include_src, false},
  {extended_start_script, true}
]
}.
%% 定义其它发布环境
%% 参数使用覆盖(override)机制，即这里面没有定义的参数，将使用默认发布环境(default)配置
{profiles, [
  {prod, [
    {relx, [
      {sys_config, "./config/prod.config"},
      {vm_args, "./config/prod_vm.args"},
      {dev_mode, false},
      {include_erts, false},
      {include_src, false},
      {extended_start_script, true}
    ]}]
  },

  {dev, [
    {relx,
      [
        {dev_mode, false},
        {include_erts, false},
        {include_src, false},
        {extended_start_script, true}
      ]
    }
  ]
  },

  {test, [
    {relx, [
      {dev_mode, true}
    ]}
  ]}
]
}.
{build, "prod"}.



